package com.baikeyang.service.dictionaries;

import com.baikeyang.common.bean.ResponseResult;
import com.baikeyang.common.model.Dictionaries;
import com.baikeyang.service.base.ISuperService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author BaiKeyang
 * @since 2019-05-12
 */
public interface IDictionariesService extends ISuperService<Dictionaries> {

	/**
	 * 获取活动类型
	 * @return
	 */
	List<Dictionaries> queryDictionariesByCode(String code);
	/**
	 * 获取活动类型
	 * @return
	 */
	IPage<Dictionaries> queryDictionariesPageByCode(Page<Dictionaries> pageParam, String code);

	/**
	 * 根据编码获取字典数据
	 * @param code
	 * @return
	 */
	Dictionaries queryDictionaryByCode(String code);

	/**
	 * 根据ID获取字典数据
	 * @param id
	 * @return
	 */
	Dictionaries queryDictionaryById(Integer id);

	/**
	 * 保存字典数据
	 * @param dictionaries
	 * @return
	 */
	ResponseResult saveDictionary(Dictionaries dictionaries);

	/**
	 * 更新字典数据
	 * @param dictionaries
	 * @return
	 */
	ResponseResult updateDictionary(Dictionaries dictionaries);

	/**
	 * 获取字典数据Code下最大的Value
	 * @param code
	 * @return
	 */
	Integer queryMaxValueByCode(String code);

	/**
	 * 删除字典数据
	 * @param id
	 * @return
	 */
	int deleteDictionary(int id);
}
